package com.hfut.manage.mapper;

import com.hfut.manage.pojo.Family;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.*;

public interface FamilyMapper extends BaseMapper<Family> {


    @Insert("INSERT INTO family (teacherId, spouse, hasChildren) VALUES (#{teacherId}, #{spouse}, #{hasChildren})")
    public int insertFamily(Family familyView);


    @Update("UPDATE family SET teacherId = #{teacherID},spouse = #{spouse}, hasChildren = #{hasChildren} WHERE id = #{id}")
    public int updateFamily(Family familyView);


    @Delete("DELETE  FROM family WHERE id = #{id}")
    public int deleteFamily(Long id);
}
